﻿<%@ Page Title="Add Item" Language="C#" MasterPageFile="~/Resources/AAMMaster.master"
    AutoEventWireup="true" CodeBehind="additem.aspx.cs" Inherits="LMKJ.additem" %>

<asp:Content ID="Content" ContentPlaceHolderID="Content" runat="server">
    <div class="form_name">
        Item Management</div>
    <table style="width: 100%">
        <tr>
            <td colspan="2">
                <asp:CustomValidator ID="fieldsValidator" runat="server" OnServerValidate="fieldsValidator_ServerValidate"
                    Display="Dynamic" ErrorMessage="Some required fields are empty! All required fields must be completed to create an item!"
                    ForeColor="Red" ValidationGroup="AddItem"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td>
                <b>Item Name*</b>
            </td>
            <td>
                <asp:TextBox ID="itemNameTbx" runat="server" Width="200px"></asp:TextBox>
                <asp:CustomValidator ID="nameValidator" runat="server" ErrorMessage="Item exists!"
                    ForeColor="Red" Display="Dynamic" ValidationGroup="AddItem" OnServerValidate="itemValidator_ServerValidate"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td>
                <b>Description</b>
            </td>
            <td>
                <asp:TextBox ID="descriptionTbx" runat="server" Width="100%" Height="100px" TextMode="MultiLine"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td>
                <b>Price*</b>
            </td>
            <td>
                $
                <asp:TextBox ID="dollarsTbx" runat="server" MaxLength="3" Width="30px"></asp:TextBox>
                .
                <asp:TextBox ID="centsTbx" runat="server" MaxLength="2" Width="20px"></asp:TextBox>
                <asp:CustomValidator ID="priceValidator" runat="server" OnServerValidate="priceValidator_ServerValidate"
                    Display="Dynamic" ErrorMessage="Price contains invalid characters or is empty!"
                    ForeColor="Red" ValidationGroup="AddItem"></asp:CustomValidator>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <b>*Required Fields </b>
            </td>
        </tr>
        <tr>
            <td colspan="2">
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <asp:Button ID="addBtn" runat="server" Text="Add Item" OnClick="addBtn_Click" CssClass="buttonAddItem"
                    ValidationGroup="AddItem" />
                <asp:Button ID="cancelBtn" runat="server" Text="Cancel" OnClick="cancelBtn_Click"
                    CssClass="buttonCancel" CausesValidation="False" />
            </td>
        </tr>
    </table>
</asp:Content>
